<template>
  <div>
    <div class="title">热销推荐</div>
    <router-link tag="div" :to="'/detail/' + item.id " class="item border-bottom" v-for="item of recommendList" :key="item.id">
      <img class="item-img" :src="item.imgUrl">
      <div class="item-info">
        <p class="item-title">{{item.title}}</p>
        <p class="item-desc">{{item.desc}}</p>
      </div>
    </router-link>
  </div>
</template>

<script>

export default {
  name: 'HomeRecommend',
  props: {
    recommendList: Array
  },
  data () {
    return {

    }
  },
  methods: {

  }
}

</script>

<style lang="stylus" scoped>
  .title
    background: #eee
    line-height: 2rem
    padding-left: .5rem
  .item
    display: flex
    overflow: hidden
    height: 7rem
    margin: 1rem 0
    .item-img
      width: 6rem
      height: 6rem
      margin-left: .5rem
      background: #eee;
    .item-info
      flex: 1
      margin: 1rem .5rem
</style>





